-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Davis Mariotti <[email protected]>
- Loading branch information
1 parent
79e5537
commit b9e7331
Showing
32 changed files
with
7,305 additions
and
8,401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { ThemeProvider } from '@mui/material/styles' | ||
import React from 'react' | ||
import { BrowserRouter, Route } from 'react-router-dom' | ||
import './App.css' | ||
import muiTheme from './muiTheme' | ||
import MainPage from './pages/main' | ||
import Navbar from './pages/navbar' | ||
import UsernamePage from './pages/username' | ||
import { CssBaseline, StyledEngineProvider } from '@mui/material' | ||
|
||
function App() { | ||
return ( | ||
<React.Fragment> | ||
<StyledEngineProvider injectFirst> | ||
<CssBaseline /> | ||
<ThemeProvider theme={muiTheme}> | ||
<BrowserRouter> | ||
<div style={{width: '100%',height: '100%', minHeight: '100vh'}}> | ||
<Navbar /> | ||
<Route path="/" component={MainPage} exact /> | ||
<Route path="/user/:id" component={UsernamePage} exact /> | ||
</div> | ||
</BrowserRouter> | ||
</ThemeProvider> | ||
</StyledEngineProvider> | ||
</React.Fragment> | ||
) | ||
} | ||
|
||
export default App |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import useLazyGetAPI from './useLazyGetAPI' | ||
import { GetOptions, LazyGetExecFunction } from '../types' | ||
|
||
export default function useGetUsernameInfoLazy( | ||
options?: GetOptions | ||
): [ | ||
(username: string) => Promise<any>, | ||
{ | ||
data?: any | ||
loading: boolean | ||
error?: Error | ||
refetch: LazyGetExecFunction | ||
} | ||
] { | ||
const lazyGet = useLazyGetAPI(options) | ||
|
||
return [(username: string) => lazyGet[0](`username/${username}`), lazyGet[1]] | ||
} |
9 changes: 5 additions & 4 deletions
9
SurvivalConfig/src/hooks/useLazyGetAPI.js → SurvivalConfig/src/hooks/useLazyGetAPI.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
SurvivalConfig/src/hooks/usePostApi.js → SurvivalConfig/src/hooks/usePostApi.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...Config/src/hooks/useUpdateMobileNumber.js → ...Config/src/hooks/useUpdateMobileNumber.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import usePostAPI from './usePostApi' | ||
|
||
export default function useUpdateMobileNumber(id) { | ||
export default function useUpdateMobileNumber(id: string) { | ||
return usePostAPI(`user/${id}/updatemobile`) | ||
} |
2 changes: 1 addition & 1 deletion
2
...valConfig/src/hooks/useUpdateTimeSlots.js → ...valConfig/src/hooks/useUpdateTimeSlots.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import usePostAPI from './usePostApi' | ||
|
||
export default function useUpdateTimeSlots(id) { | ||
export default function useUpdateTimeSlots(id: string) { | ||
return usePostAPI(`time_slots/${id}/update`) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import useGetAPI from './useGetAPI' | ||
import { GetOptions } from '../types' | ||
|
||
export default function useUsernameRecord(username: string, options?: GetOptions) { | ||
return useGetAPI(`user/${username}`, options) | ||
} |
4 changes: 2 additions & 2 deletions
4
SurvivalConfig/src/icons/GithubIcon.js → SurvivalConfig/src/icons/GithubIcon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import './index.css' | ||
import { createRoot } from 'react-dom/client' | ||
import App from './App' | ||
import * as serviceWorker from './serviceWorker' | ||
|
||
ReactDOM.render(<App />, document.getElementById('root')) | ||
const container = document.getElementById('root') | ||
const root = createRoot(container) // createRoot(container!) if you use TypeScript | ||
root.render(<App />) | ||
|
||
// If you want your app to work offline and load faster, you can change | ||
// unregister() to register() below. Note this comes with some pitfalls. | ||
// Learn more about service workers: https://bit.ly/CRA-PWA | ||
serviceWorker.unregister() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.