Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pages/account/statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ export async function getServerSideProps(context) {
data.links.clicks = totalClicks;

return {
props: { data, profile, progress },
props: { data, profile, progress, BASE_URL: clientEnv.NEXT_PUBLIC_BASE_URL },
};
}

export default function Statistics({ data, profile, progress }) {
export default function Statistics({ data, profile, progress, BASE_URL }) {
const dateTimeStyle = {
dateStyle: "short",
};
Expand Down Expand Up @@ -151,7 +151,7 @@ export default function Statistics({ data, profile, progress }) {

<h1 className="text-4xl mb-4 font-bold">
Your Statistics for {profile.name} (
<Link href={`${clientEnv.NEXT_PUBLIC_BASE_URL}/${profile.username}`}>
<Link href={`${BASE_URL}/${profile.username}`}>
{profile.username}
</Link>
)
Expand Down
10 changes: 8 additions & 2 deletions pages/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ import UserPage from "@components/user/UserPage";
import Notification from "@components/Notification";
import { clientEnv } from "@config/schemas/clientSchema";

export default function Playground() {
const BASE_URL = clientEnv.NEXT_PUBLIC_BASE_URL;
export async function getServerSideProps(){
return {
props: { BASE_URL: clientEnv.NEXT_PUBLIC_BASE_URL },
};
}

export default function Playground({BASE_URL}) {

const defaultJson = `{
"name": "Your Name",
"bio": "Write a short bio about yourself",
Expand Down