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

feat(core): create a <Link /> component to navigate to a given resource. #6330

Merged
merged 8 commits into from
Sep 19, 2024

Conversation

alicanerdurmaz
Copy link
Member

@alicanerdurmaz alicanerdurmaz commented Sep 13, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

import { useNavigation } from "@refinedev/core";
import { Link } from "react-router-dom";

export const MyComponent = () => {
  const { listUrl } = useNavigation();

  return <Link to={listUrl("posts")}>Go to posts list</Link>;
};

What is the new behavior?

import { Link } from "@refinedev/core";

export const MyComponent = () => {
  return (
    <Link
      go={{
        to: {
          resource: "posts",
          action: "list",
        },
        query: {
          filters: [
            {
              operator: "eq",
              value: "published",
              field: "status",
            },
          ],
        },
      }}
    >
      Go to the posts list
    </Link>
  );
};

fixes #6329

Notes for reviewers

Examples are updated on this PR: #6331

@alicanerdurmaz alicanerdurmaz requested a review from a team as a code owner September 13, 2024 08:50
Copy link

changeset-bot bot commented Sep 13, 2024

🦋 Changeset detected

Latest commit: 58c87e3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@refinedev/core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@refine-bot refine-bot temporarily deployed to deploy-preview-website-6330 September 13, 2024 09:18 Inactive
Copy link

cypress bot commented Sep 13, 2024

refine    Run #11511

Run Properties:  status check passed Passed #11511  •  git commit a576060005 ℹ️: Merge 58c87e32c9098b70efd28180f67fe88e4e0b1794 into 6e5d97c2b82aa70f5053bcb70012...
Project refine
Branch Review RK-778-core-link-should-accept-go-config
Run status status check passed Passed #11511
Run duration 17m 14s
Commit git commit a576060005 ℹ️: Merge 58c87e32c9098b70efd28180f67fe88e4e0b1794 into 6e5d97c2b82aa70f5053bcb70012...
Committer Alican Erdurmaz
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 31
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 83
View all changes introduced in this branch ↗︎

@aliemir aliemir changed the title feat(core): Create a <Link /> component to navigate to a given resource. feat(core): create a <Link /> component to navigate to a given resource. Sep 16, 2024
@BatuhanW BatuhanW added this to the October Release milestone Sep 16, 2024
@refine-bot refine-bot temporarily deployed to deploy-preview-website-6330 September 18, 2024 08:08 Inactive
@alicanerdurmaz alicanerdurmaz changed the base branch from master to releases/october September 18, 2024 08:17
@alicanerdurmaz alicanerdurmaz requested a review from a team as a code owner September 18, 2024 08:17
@refine-bot refine-bot temporarily deployed to deploy-preview-website-6330 September 18, 2024 08:43 Inactive
@BatuhanW BatuhanW merged commit 5a81b35 into releases/october Sep 19, 2024
92 checks passed
@BatuhanW BatuhanW deleted the RK-778-core-link-should-accept-go-config branch September 19, 2024 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Create a <Link /> component to navigate to a given resource.
3 participants