mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-20 19:30:41 -05:00
remove superjson and custom babel config, bugfix lastSubmission bug when no values present
This commit is contained in:
@@ -37,7 +37,9 @@ export default function ResultsAnalytics({ formId }) {
|
||||
{
|
||||
id: "lastSubmission",
|
||||
name: "Last Submission",
|
||||
stat: timeSince(analytics.lastSubmissionAt) || "--",
|
||||
stat: analytics.lastSubmissionAt
|
||||
? timeSince(analytics.lastSubmissionAt)
|
||||
: "--",
|
||||
smallerText: true,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -49,7 +49,9 @@ export default function ResultsSummary({ formId }) {
|
||||
{
|
||||
id: "lastSubmission",
|
||||
name: "Last Submission",
|
||||
stat: timeSince(analytics.lastSubmissionAt) || "--",
|
||||
stat: analytics.lastSubmissionAt
|
||||
? timeSince(analytics.lastSubmissionAt)
|
||||
: "--",
|
||||
smallerText: true,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -5,7 +5,7 @@ export default function TextResults({ element }) {
|
||||
<BaseResults element={element}>
|
||||
<div className="flow-root px-8 my-4 mt-6 overflow-y-scroll text-center h-44 max-h-64">
|
||||
<ul className="-my-5 divide-y divide-ui-gray-light">
|
||||
{element.summary.map((answer) => (
|
||||
{element?.summary?.map((answer) => (
|
||||
<li key={answer} className="py-4">
|
||||
<div className="relative focus-within:ring-2 focus-within:ring-indigo-500">
|
||||
<h3 className="text-sm text-gray-700">
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
"@heroicons/react": "^1.0.6",
|
||||
"@prisma/client": "^4.1.0",
|
||||
"@snoopforms/react": "^0.2.2",
|
||||
"babel-plugin-superjson-next": "^0.4.3",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"chart.js": "^3.8.2",
|
||||
"date-fns": "^2.28.0",
|
||||
@@ -37,7 +36,6 @@
|
||||
"react-loader-spinner": "^5.1.5",
|
||||
"react-toastify": "^9.0.5",
|
||||
"sharp": "^0.30.7",
|
||||
"superjson": "^1.9.1",
|
||||
"swr": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
+10
-4
@@ -6,10 +6,7 @@ import { SessionProvider } from "next-auth/react";
|
||||
import { ToastContainer } from "react-toastify";
|
||||
import { usePosthog } from "../lib/posthog";
|
||||
|
||||
export default function App({
|
||||
Component,
|
||||
pageProps: { session, ...pageProps },
|
||||
}: AppProps) {
|
||||
function App({ Component, pageProps: { session, ...pageProps } }: AppProps) {
|
||||
usePosthog();
|
||||
return (
|
||||
<SessionProvider session={session}>
|
||||
@@ -18,3 +15,12 @@ export default function App({
|
||||
</SessionProvider>
|
||||
);
|
||||
}
|
||||
|
||||
/* App.getInitialProps = async (appContext) => {
|
||||
// calls page's `getInitialProps` and fills `appProps.pageProps`
|
||||
const appProps = await App.getInitialProps(appContext);
|
||||
|
||||
return { ...appProps };
|
||||
}; */
|
||||
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user