Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
893505d2
Commit
893505d2
authored
Nov 07, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix seo for blocks and tx
parent
741e498f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
95 deletions
+38
-95
BlockNextPage.tsx
lib/next/block/BlockNextPage.tsx
+0
-28
BlocksNextPage.tsx
lib/next/blocks/BlocksNextPage.tsx
+0
-21
types.ts
lib/next/blocks/types.ts
+0
-1
getServerSideProps.ts
lib/next/getServerSideProps.ts
+3
-1
TransactionNextPage.tsx
lib/next/tx/TransactionNextPage.tsx
+0
-28
[id].tsx
pages/block/[id].tsx
+13
-8
blocks.tsx
pages/blocks.tsx
+10
-2
[id].tsx
pages/tx/[id].tsx
+12
-6
No files found.
lib/next/block/BlockNextPage.tsx
deleted
100644 → 0
View file @
741e498f
import
type
{
NextPage
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
./types
'
;
import
Block
from
'
ui/pages/Block
'
;
import
getSeo
from
'
./getSeo
'
;
type
Props
=
{
pageParams
:
PageParams
;
}
const
BlockNextPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
const
{
title
,
description
}
=
getSeo
(
pageParams
);
return
(
<>
<
Head
>
<
title
>
{
title
}
</
title
>
<
meta
name=
"description"
content=
{
description
}
/>
</
Head
>
<
Block
/>
</>
);
};
export
default
BlockNextPage
;
lib/next/blocks/BlocksNextPage.tsx
deleted
100644 → 0
View file @
741e498f
import
type
{
NextPage
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
Blocks
from
'
ui/pages/Blocks
'
;
import
getSeo
from
'
./getSeo
'
;
const
BlocksNextPage
:
NextPage
=
()
=>
{
const
{
title
}
=
getSeo
();
return
(
<>
<
Head
>
<
title
>
{
title
}
</
title
>
</
Head
>
<
Blocks
/>
</>
);
};
export
default
BlocksNextPage
;
lib/next/blocks/types.ts
deleted
100644 → 0
View file @
741e498f
export
type
PageParams
=
unknown
lib/next/getServerSideProps.ts
View file @
893505d2
...
@@ -3,13 +3,15 @@ import type { GetServerSideProps, GetServerSidePropsResult } from 'next';
...
@@ -3,13 +3,15 @@ import type { GetServerSideProps, GetServerSidePropsResult } from 'next';
export
type
Props
=
{
export
type
Props
=
{
cookies
:
string
;
cookies
:
string
;
referrer
:
string
;
referrer
:
string
;
id
?:
string
;
}
}
export
const
getServerSideProps
:
GetServerSideProps
=
async
({
req
}):
Promise
<
GetServerSidePropsResult
<
Props
>>
=>
{
export
const
getServerSideProps
:
GetServerSideProps
=
async
({
req
,
query
}):
Promise
<
GetServerSidePropsResult
<
Props
>>
=>
{
return
{
return
{
props
:
{
props
:
{
cookies
:
req
.
headers
.
cookie
||
''
,
cookies
:
req
.
headers
.
cookie
||
''
,
referrer
:
req
.
headers
.
referer
||
''
,
referrer
:
req
.
headers
.
referer
||
''
,
id
:
query
.
id
?.
toString
()
||
''
,
},
},
};
};
};
};
lib/next/tx/TransactionNextPage.tsx
deleted
100644 → 0
View file @
741e498f
import
type
{
NextPage
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
./types
'
;
import
Transaction
from
'
ui/pages/Transaction
'
;
import
getSeo
from
'
./getSeo
'
;
type
Props
=
{
pageParams
:
PageParams
;
}
const
TransactionNextPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
const
{
title
,
description
}
=
getSeo
(
pageParams
);
return
(
<>
<
Head
>
<
title
>
{
title
}
</
title
>
<
meta
name=
"description"
content=
{
description
}
/>
</
Head
>
<
Transaction
/>
</>
);
};
export
default
TransactionNextPage
;
pages/block/[id].tsx
View file @
893505d2
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
lib/next/
tx
/types
'
;
import
type
{
PageParams
}
from
'
lib/next/
block
/types
'
;
import
BlockNextPage
from
'
lib/next/block/BlockNextPage
'
;
import
getSeo
from
'
lib/next/block/getSeo
'
;
import
Block
from
'
ui/pages/Block
'
;
type
Props
=
{
const
BlockPage
:
NextPage
<
PageParams
>
=
({
id
}:
PageParams
)
=>
{
pageParams
:
PageParams
;
const
{
title
,
description
}
=
getSeo
({
id
});
}
const
BlockPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
(
return
(
<
BlockNextPage
pageParams=
{
pageParams
}
/>
<>
<
Head
>
<
title
>
{
title
}
</
title
>
<
meta
name=
"description"
content=
{
description
}
/>
</
Head
>
<
Block
/>
</>
);
);
};
};
...
...
pages/blocks.tsx
View file @
893505d2
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
BlocksNextPage
from
'
lib/next/blocks/BlocksNextPage
'
;
import
getSeo
from
'
lib/next/blocks/getSeo
'
;
import
Blocks
from
'
ui/pages/Blocks
'
;
const
BlockPage
:
NextPage
=
()
=>
{
const
BlockPage
:
NextPage
=
()
=>
{
const
{
title
}
=
getSeo
();
return
(
return
(
<
BlocksNextPage
/>
<>
<
Head
>
<
title
>
{
title
}
</
title
>
</
Head
>
<
Blocks
/>
</>
);
);
};
};
...
...
pages/tx/[id].tsx
View file @
893505d2
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
lib/next/tx/types
'
;
import
type
{
PageParams
}
from
'
lib/next/tx/types
'
;
import
TransactionNextPage
from
'
lib/next/tx/TransactionNextPage
'
;
import
getSeo
from
'
lib/next/tx/getSeo
'
;
import
Transaction
from
'
ui/pages/Transaction
'
;
type
Props
=
{
const
TransactionPage
:
NextPage
<
PageParams
>
=
({
id
}:
PageParams
)
=>
{
pageParams
:
PageParams
;
const
{
title
,
description
}
=
getSeo
({
id
});
}
const
TransactionPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
(
return
(
<
TransactionNextPage
pageParams=
{
pageParams
}
/>
<>
<
Head
>
<
title
>
{
title
}
</
title
>
<
meta
name=
"description"
content=
{
description
}
/>
</
Head
>
<
Transaction
/>
</>
);
);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment