Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor LinkButton to v2 #20029

Merged
merged 6 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/core/admin/admin/src/pages/InternalErrorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
*
*/

import { ContentLayout, EmptyStateLayout, HeaderLayout, LinkButton } from '@strapi/design-system';
import { ContentLayout, EmptyStateLayout, HeaderLayout } from '@strapi/design-system';
import { LinkButton } from '@strapi/design-system/v2';
import { ArrowRight, EmptyPictures } from '@strapi/icons';
import { useIntl } from 'react-intl';

Expand All @@ -26,7 +27,7 @@ export const InternalErrorPage = () => {
<ContentLayout>
<EmptyStateLayout
action={
<LinkButton variant="secondary" endIcon={<ArrowRight />} to="/">
<LinkButton variant="secondary" endIcon={<ArrowRight />} href="/">
joshuaellis marked this conversation as resolved.
Show resolved Hide resolved
{formatMessage({
id: 'app.components.NotFoundPage.back',
defaultMessage: 'Back to homepage',
Expand Down
5 changes: 3 additions & 2 deletions packages/core/admin/admin/src/pages/NotFoundPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* This is the page we show when the user visits a url that doesn't have a route
*
*/
import { ContentLayout, EmptyStateLayout, HeaderLayout, LinkButton } from '@strapi/design-system';
import { ContentLayout, EmptyStateLayout, HeaderLayout } from '@strapi/design-system';
import { LinkButton } from '@strapi/design-system/v2';
import { ArrowRight, EmptyPictures } from '@strapi/icons';
import { useIntl } from 'react-intl';

Expand All @@ -25,7 +26,7 @@ export const NotFoundPage = () => {
<ContentLayout>
<EmptyStateLayout
action={
<LinkButton variant="secondary" endIcon={<ArrowRight />} to="/">
<LinkButton variant="secondary" endIcon={<ArrowRight />} href="/">
{formatMessage({
id: 'app.components.NotFoundPage.back',
defaultMessage: 'Back to homepage',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';

import { ContentLayout, EmptyStateLayout, HeaderLayout, LinkButton } from '@strapi/design-system';
import { ContentLayout, EmptyStateLayout, HeaderLayout } from '@strapi/design-system';
import { LinkButton } from '@strapi/design-system/v2';
import { EmptyDocuments, Plus } from '@strapi/icons';
import { Data } from '@strapi/types';
import * as qs from 'qs';
Expand Down Expand Up @@ -154,7 +155,7 @@ export const ListView = () => {
tokenType: API_TOKEN_TYPE,
})
}
to="/settings/api-tokens/create"
href="api-tokens/create"
>
{formatMessage({
id: 'Settings.apiTokens.create',
Expand Down Expand Up @@ -187,11 +188,7 @@ export const ListView = () => {
defaultMessage: 'Add your first API Token',
})}
action={
<LinkButton
variant="secondary"
startIcon={<Plus />}
to="/settings/api-tokens/create"
>
<LinkButton variant="secondary" startIcon={<Plus />} href="api-tokens/create">
{formatMessage({
id: 'Settings.apiTokens.addNewToken',
defaultMessage: 'Add new API Token',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';

import { ContentLayout, EmptyStateLayout, HeaderLayout, LinkButton } from '@strapi/design-system';
import { ContentLayout, EmptyStateLayout, HeaderLayout } from '@strapi/design-system';
import { LinkButton } from '@strapi/design-system/v2';
import { EmptyDocuments, Plus } from '@strapi/icons';
import { Data } from '@strapi/types';
import * as qs from 'qs';
Expand Down Expand Up @@ -167,7 +168,7 @@ const ListView = () => {
tokenType: TRANSFER_TOKEN_TYPE,
})
}
to="/settings/transfer-tokens/create"
href="transfer-tokens/create"
>
{formatMessage({
id: 'Settings.transferTokens.create',
Expand Down Expand Up @@ -198,7 +199,7 @@ const ListView = () => {
<LinkButton
variant="secondary"
startIcon={<Plus />}
to="/settings/transfer-tokens/create"
href="transfer-tokens/create"
>
{formatMessage({
id: 'Settings.transferTokens.addNewToken',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Box, Flex, Icon, LinkButton, Typography } from '@strapi/design-system';
import { Box, Flex, Icon, Typography } from '@strapi/design-system';
import { LinkButton } from '@strapi/design-system/v2';
import { EmptyDocuments, Plus } from '@strapi/icons';
import * as qs from 'qs';
import { useIntl } from 'react-intl';
Expand Down Expand Up @@ -59,7 +60,7 @@ export const EmptyAttributes = () => {
</Box>
</Box>
<LinkButton
to={`/marketplace?${qs.stringify({ categories: ['Custom fields'] })}`}
href={`/admin/marketplace?${qs.stringify({ categories: ['Custom fields'] })}`}
variant="secondary"
startIcon={<Plus />}
>
Expand Down