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: support props #9

Merged
merged 4 commits into from Sep 11, 2022
Merged

refactor: support props #9

merged 4 commits into from Sep 11, 2022

Conversation

Sepush
Copy link
Contributor

@Sepush Sepush commented Sep 10, 2022

Signed-off-by: Sepush sepush@outlook.com

Signed-off-by: Sepush <sepush@outlook.com>
Signed-off-by: Sepush <sepush@outlook.com>
Signed-off-by: Sepush <sepush@outlook.com>
Copy link
Member

@ice1000 ice1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to create a new page similar to Publications/index.ts?

@Sepush
Copy link
Contributor Author

Sepush commented Sep 11, 2022

How to create a new page similar to Publications/index.ts?

just like before or pass the data as prop for it
<Publications :pubs="data">

@ice1000
Copy link
Member

ice1000 commented Sep 11, 2022

How to create a new page similar to Publications/index.ts?

just like before or pass the data as prop for it
<Publications :pubs="data">

Can you make pubs.ts use this syntax?

@Sepush
Copy link
Contributor Author

Sepush commented Sep 11, 2022

How to create a new page similar to Publications/index.ts?

just like before or pass the data as prop for it
<Publications :pubs="data">

Can you make pubs.ts use this syntax?

I made it be the default value of props pub so it's no need to pass a prop now

@ice1000
Copy link
Member

ice1000 commented Sep 11, 2022

How does pubs.ts work now? It doesn't use a <Publications /> widget

@Sepush
Copy link
Contributor Author

Sepush commented Sep 11, 2022

How does pubs.ts work now? It doesn't use a <Publications /> widget

  • pub.ts just provide the data that match the type Publications I define in the interface.ts
  • Publications.tsx this component import the data from pub.ts and pass it as the default value of props pub
  • in the pubs/index.md we use <Publications /> this is how it works

@ice1000
Copy link
Member

ice1000 commented Sep 11, 2022

Screenshot_20220911-004406.png

Which one of these is pubs/index?

@ice1000
Copy link
Member

ice1000 commented Sep 11, 2022

I think you have to change it to use the data in pubs.ts am I right

@ice1000
Copy link
Member

ice1000 commented Sep 11, 2022

Can we have no default value but pass in argument explicitly?

@Sepush
Copy link
Contributor Author

Sepush commented Sep 11, 2022

I think you have to change it to use the data in pubs.ts am I right

I did not change this file so it not in the change files
the path is /src/pubs

@Sepush
Copy link
Contributor Author

Sepush commented Sep 11, 2022

Can we have no default value but pass in argument explicitly?

we can but have the default value is a better we
so that we don't need import data and pass is in a .md file

@ice1000
Copy link
Member

ice1000 commented Sep 11, 2022

Can we have no default value but pass in argument explicitly?

we can but have the default value is a better we
so that we don't need import data and pass is in a .md file

But there is only one default value, and if I want to pass in data I'll have to do it myself. I'm just curious how to import data in .md

Signed-off-by: Sepush <sepush@outlook.com>
<script setup lang="ts">
import {publications} from '/.vitepress/pubs'
</script>
<Publications :pubs="publications"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naruhoto

@ice1000 ice1000 merged commit ff1e50b into aya-prover:main Sep 11, 2022
@Sepush Sepush deleted the re branch October 6, 2022 05:32
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.

None yet

2 participants