mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-29 10:16:32 +02:00
🐛 Fix client error being thrown (#725)
This commit is contained in:
parent
267a40768a
commit
e43864e6a9
6 changed files with 16 additions and 5 deletions
|
@ -40,7 +40,7 @@
|
|||
"color-hash": "^2.0.2",
|
||||
"crypto": "^1.0.1",
|
||||
"dayjs": "^1.11.8",
|
||||
"framer-motion": "^6.5.1",
|
||||
"framer-motion": "^10.12.18",
|
||||
"i18next": "^22.4.9",
|
||||
"i18next-icu": "^2.3.0",
|
||||
"ics": "^3.1.0",
|
||||
|
|
|
@ -277,7 +277,7 @@ const Prefetch = ({ children }: React.PropsWithChildren) => {
|
|||
return <Error404 />;
|
||||
}
|
||||
|
||||
if (!poll.isFetched || !watchers.isFetched || !participants.isFetched) {
|
||||
if (!poll.data || !watchers.data || !participants.data) {
|
||||
return (
|
||||
<div>
|
||||
<TopBar className="flex flex-col items-start justify-between gap-y-2 gap-x-4 sm:flex-row">
|
||||
|
|
|
@ -243,7 +243,7 @@ const PollOption: React.FunctionComponent<PollOptionProps> = ({
|
|||
/>
|
||||
</div>
|
||||
) : (
|
||||
<AnimatePresence initial={false} exitBeforeEnter={true}>
|
||||
<AnimatePresence initial={false} mode="wait">
|
||||
<PopInOut
|
||||
key={vote}
|
||||
className="flex h-full w-9 items-center justify-center"
|
||||
|
|
|
@ -55,7 +55,7 @@ export const ScoreSummary: React.FunctionComponent<PopularityScoreProps> =
|
|||
}}
|
||||
>
|
||||
<User2Icon className="h-3 w-3" />
|
||||
<AnimatePresence initial={false} exitBeforeEnter={true}>
|
||||
<AnimatePresence initial={false} mode="wait">
|
||||
<m.span
|
||||
transition={{
|
||||
duration: 0.1,
|
||||
|
|
|
@ -22,6 +22,8 @@ export const Page = () => {
|
|||
const router = useRouter();
|
||||
const { token } = router.query;
|
||||
const posthog = usePostHog();
|
||||
const queryClient = trpc.useContext();
|
||||
|
||||
const authenticate = trpc.whoami.authenticate.useMutation();
|
||||
|
||||
useMount(() => {
|
||||
|
@ -33,7 +35,7 @@ export const Page = () => {
|
|||
name: user.name,
|
||||
email: user.email,
|
||||
});
|
||||
|
||||
queryClient.invalidate();
|
||||
setTimeout(() => {
|
||||
router.replace(defaultRedirectPath);
|
||||
}, 1000);
|
||||
|
|
|
@ -5946,6 +5946,15 @@ fraction.js@^4.2.0:
|
|||
resolved "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz"
|
||||
integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==
|
||||
|
||||
framer-motion@^10.12.18:
|
||||
version "10.12.18"
|
||||
resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-10.12.18.tgz#92015860b6468a82e76c4739fcae81e1f6723b3f"
|
||||
integrity sha512-cfhiUpPbj+0eEWKjuD+5cz5cMqH71xOtMxGiS/cSGfHn2OlHIEAqFnFyzEMENw5PxWR9bMVhatzzpD6lexmHZQ==
|
||||
dependencies:
|
||||
tslib "^2.4.0"
|
||||
optionalDependencies:
|
||||
"@emotion/is-prop-valid" "^0.8.2"
|
||||
|
||||
framer-motion@^6.5.1:
|
||||
version "6.5.1"
|
||||
resolved "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz"
|
||||
|
|
Loading…
Add table
Reference in a new issue