From 12c73165245b5e12e6981ff2a2b7b77dc39fb250 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Fri, 10 Oct 2025 17:04:26 +0200 Subject: [PATCH] Refactor buttons --- web/components/buttons/general-button.tsx | 18 ++++++++++++++ web/pages/organization.tsx | 26 +++++--------------- web/pages/social.tsx | 30 ++++++----------------- 3 files changed, 32 insertions(+), 42 deletions(-) create mode 100644 web/components/buttons/general-button.tsx diff --git a/web/components/buttons/general-button.tsx b/web/components/buttons/general-button.tsx new file mode 100644 index 00000000..410f3c7e --- /dev/null +++ b/web/components/buttons/general-button.tsx @@ -0,0 +1,18 @@ +import Link from "next/link"; + +export const GeneralButton = (props: { + url: string + content: string +}) => { + const {url, content} = props + return
+ + {content} + +
; +} \ No newline at end of file diff --git a/web/pages/organization.tsx b/web/pages/organization.tsx index b6cb0d82..44fc7ccb 100644 --- a/web/pages/organization.tsx +++ b/web/pages/organization.tsx @@ -1,21 +1,7 @@ import {LovePage} from 'web/components/love-page' +import {GeneralButton} from "web/components/buttons/general-button"; -export const Block = (props: { - url: string - content: string -}) => { - const {url, content} = props - return
- - {content} - -
; -} - export default function Organization() { return ( @@ -24,11 +10,11 @@ export default function Organization() {

Organization

- - - - - + + + + +
diff --git a/web/pages/social.tsx b/web/pages/social.tsx index d57eeffc..2ae22ab2 100644 --- a/web/pages/social.tsx +++ b/web/pages/social.tsx @@ -1,22 +1,8 @@ import {LovePage} from 'web/components/love-page' -import {discordLink, githubRepo, redditLink, stoatLink, xLink, supportEmail} from "common/constants"; +import {discordLink, githubRepo, redditLink, stoatLink, supportEmail, xLink} from "common/constants"; +import {GeneralButton} from "web/components/buttons/general-button"; -export const Block = (props: { - url: string - content: string -}) => { - const {url, content} = props - return
- - {content} - -
; -} - export default function Social() { return ( @@ -25,12 +11,12 @@ export default function Social() {

Social

- - - - - - + + + + + +