-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start overhauling into generic view components
- Loading branch information
Showing
7 changed files
with
58 additions
and
21 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 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
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 |
---|---|---|
|
@@ -29,6 +29,7 @@ import {QueryClient, QueryClientProvider} from "@tanstack/react-query"; | |
import axios from "axios"; | ||
import {version} from "../package.json"; | ||
import createAuthRefreshInterceptor from "axios-auth-refresh"; | ||
import DemoView from "./routes/DemoView.jsx"; | ||
|
||
Sentry.init({ | ||
dsn: "https://[email protected]/5", | ||
|
@@ -207,6 +208,7 @@ const sentryCreateBrowserRouter = Sentry.wrapCreateBrowserRouter(createBrowserRo | |
export const router = sentryCreateBrowserRouter( | ||
createRoutesFromElements( | ||
<Route path="/" element={<Root />}> | ||
<Route path="/demo" element={<DemoView />}/> | ||
<Route path="/" element={<AuthenticationNeeded />}> | ||
<Route path="/" element={<ClientWrapper />}> | ||
<Route path="/" element={<MainView />}> | ||
|
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,32 @@ | ||
import mainViewStyles from "./MainView.module.css"; | ||
import quarkViewStyles from "./QuarkView.module.css"; | ||
import GenericQuark from "../components/nav/GenericQuark.jsx"; | ||
import QuarkHeader from "../components/_services/lightquark/nav/QuarkHeader.jsx"; | ||
import LightquarkChannelList from "../components/_services/lightquark/nav/LightquarkChannelList.jsx"; | ||
import Aviebox from "../components/_services/lightquark/nav/Aviebox.jsx"; | ||
|
||
export default function DemoView() { | ||
return <> | ||
<div className={mainViewStyles.quarkList}> | ||
<GenericQuark/> | ||
</div> | ||
<div className={quarkViewStyles.quarkView}> | ||
<div className={quarkViewStyles.channelListWrap}> | ||
<QuarkHeader interaction={false} quark={{ | ||
name: "World's realest quark :)" | ||
}}/> | ||
<LightquarkChannelList quark={{ | ||
_id: "1", | ||
channels: [{ | ||
_id: "2", | ||
name: "Rub my tummy!" | ||
}] | ||
}}/> | ||
<Aviebox interaction={false} user={{ | ||
avatarUri: "https://google.com", | ||
username: "You!" | ||
}}/> | ||
</div> | ||
</div> | ||
</> | ||
} |
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,10 +1,11 @@ | ||
import {useQuery, useQueryClient} from "@tanstack/react-query"; | ||
|
||
export default function useQuark(id) { | ||
export default function useQuark(id, options) { | ||
const queryClient = useQueryClient(); | ||
return useQuery({ | ||
queryKey: [`quark/${id}`], | ||
initialData: () => queryClient.getQueryData(["quark"])?.quarks.find(quark => quark._id === id), | ||
select: (res) => { return res?.quark ? res.quark : res; } | ||
select: (res) => { return res?.quark ? res.quark : res; }, | ||
...options | ||
}); | ||
} |
832f9e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
quarky – ./
chatanimeattheoffice.vercel.app
quarky-git-senpai-nineplus.vercel.app
quarky.vercel.app
quarky-nineplus.vercel.app
quarky.hakase.life
quarky.nineplus.sh