\r\n );\r\n}\r\n\r\nexport default App;\r\n","import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { RootState, AppThunk } from '../../app/store';\r\n\r\nexport interface CounterState {\r\n value: number;\r\n status: 'idle' | 'loading' | 'failed';\r\n}\r\n\r\nconst initialState: CounterState = {\r\n value: 0,\r\n status: 'idle',\r\n};\r\n\r\n// The function below is called a thunk and allows us to perform async logic. It\r\n// can be dispatched like a regular action: `dispatch(incrementAsync(10))`. This\r\n// will call the thunk with the `dispatch` function as the first argument. Async\r\n// code can then be executed and other actions can be dispatched. Thunks are\r\n// typically used to make async requests.\r\nexport const incrementAsync = createAsyncThunk(\r\n 'counter/fetchCount',\r\n async (amount: number) => {\r\n const response = await fetchCount(amount);\r\n // The value we return becomes the `fulfilled` action payload\r\n return response.data;\r\n }\r\n);\r\n\r\nexport const counterSlice = createSlice({\r\n name: 'counter',\r\n initialState,\r\n // The `reducers` field lets us define reducers and generate associated actions\r\n reducers: {\r\n increment: (state) => {\r\n // Redux Toolkit allows us to write 'mutating' logic in reducers. It\r\n // doesn't actually mutate the state because it uses the Immer library,\r\n // which detects changes to a 'draft state' and produces a brand new\r\n // immutable state based off those changes\r\n state.value += 1;\r\n },\r\n decrement: (state) => {\r\n state.value -= 1;\r\n },\r\n // Use the PayloadAction type to declare the contents of `action.payload`\r\n incrementByAmount: (state, action: PayloadAction) => {\r\n state.value += action.payload;\r\n },\r\n },\r\n // The `extraReducers` field lets the slice handle actions defined elsewhere,\r\n // including actions generated by createAsyncThunk or in other slices.\r\n extraReducers: (builder) => {\r\n builder\r\n .addCase(incrementAsync.pending, (state) => {\r\n state.status = 'loading';\r\n })\r\n .addCase(incrementAsync.fulfilled, (state, action) => {\r\n state.status = 'idle';\r\n state.value += action.payload;\r\n });\r\n },\r\n});\r\n\r\nexport const { increment, decrement, incrementByAmount } = counterSlice.actions;\r\n\r\n// The function below is called a selector and allows us to select a value from\r\n// the state. Selectors can also be defined inline where they're used instead of\r\n// in the slice file. For example: `useSelector((state: RootState) => state.counter.value)`\r\nexport const selectCount = (state: RootState) => state.counter.value;\r\n\r\n// We can also write thunks by hand, which may contain both sync and async logic.\r\n// Here's an example of conditionally dispatching actions based on current state.\r\nexport const incrementIfOdd =\r\n (amount: number): AppThunk =>\r\n (dispatch, getState) => {\r\n const currentValue = selectCount(getState());\r\n if (currentValue % 2 === 1) {\r\n dispatch(incrementByAmount(amount));\r\n }\r\n };\r\n\r\nexport default counterSlice.reducer;\r\nfunction fetchCount(amount: number) {\r\n return { data: 0 };\r\n}\r\n\r\n","import { configureStore, ThunkAction, Action } from '@reduxjs/toolkit';\r\nimport counterReducer from '../features/counter/counterSlice';\r\nimport markdownsReducer from '../features/markdown/markdownSlice';\r\n\r\nexport const store = configureStore({\r\n reducer: {\r\n counter: counterReducer,\r\n markdowns: markdownsReducer\r\n },\r\n});\r\n\r\nexport type AppDispatch = typeof store.dispatch;\r\nexport type RootState = ReturnType;\r\nexport type AppThunk = ThunkAction<\r\n ReturnType,\r\n RootState,\r\n unknown,\r\n Action\r\n>;\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport App from './App';\r\nimport { store } from './app/store';\r\nimport { Provider } from 'react-redux';\r\nimport './styles/styles.scss';\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"layout__wrapper\":\"Layout_layout__wrapper__2RyqE\",\"layout__design\":\"Layout_layout__design__1Kf9d\",\"layout__portfolioDetails\":\"Layout_layout__portfolioDetails__l6KFA\",\"layout__aboutMe\":\"Layout_layout__aboutMe__3YJW4\",\"layout__contact\":\"Layout_layout__contact__2ISh0\",\"layout__header\":\"Layout_layout__header__1Aww0\",\"layout__anchor\":\"Layout_layout__anchor__3pqoI\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"designProcess__markdown\":\"DesignProcess_designProcess__markdown__2dhFO\",\"designProcess__table\":\"DesignProcess_designProcess__table__234zT\",\"designProcess__tableCell\":\"DesignProcess_designProcess__tableCell__xw4oY\",\"designProcess__tableRow\":\"DesignProcess_designProcess__tableRow__1ZB8r\",\"designProcess__tableCellHeader\":\"DesignProcess_designProcess__tableCellHeader__wAM2d\",\"designProcess__listItem\":\"DesignProcess_designProcess__listItem__l8hsL\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"portfolioDetails\":\"PortfolioDetails_portfolioDetails__3KQ2E\",\"portfolioDetails__container\":\"PortfolioDetails_portfolioDetails__container__2xsdI\",\"custom\":\"PortfolioDetails_custom__1IQTB\",\"sliderElement\":\"PortfolioDetails_sliderElement__2dCPV\",\"carouselContainer\":\"PortfolioDetails_carouselContainer__2eamY\",\"navigationMobile\":\"PortfolioDetails_navigationMobile__20Xan\",\"navigationIconLeft\":\"PortfolioDetails_navigationIconLeft__3tb0L\",\"navigationIconRight\":\"PortfolioDetails_navigationIconRight__8-tQt\",\"imageContainer\":\"PortfolioDetails_imageContainer__3d8VO\",\"descriptionContainer\":\"PortfolioDetails_descriptionContainer__1rMF4\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"footer\":\"AppFooter_footer__2DpQz\",\"footer__impressum\":\"AppFooter_footer__impressum__CapLu\",\"footer__ajanlat\":\"AppFooter_footer__ajanlat__21IE6\",\"backandforth\":\"AppFooter_backandforth__3ZJV-\",\"upanddown\":\"AppFooter_upanddown__3PFo-\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"portfolio__markdown\":\"Portfolio_portfolio__markdown__PqA2o\",\"portfolio__arrow\":\"Portfolio_portfolio__arrow__3ZdBU\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"contact__markdown\":\"Contact_contact__markdown__joU2v\",\"contact__content\":\"Contact_contact__content__3XQoW\"};"],"sourceRoot":""}